package dnl.dtools.grm.remote;

public class UserPasswordRemoteSessionInfo implements Cloneable {
        
    private String sessionName;

    private String host;

    private String userName;

    private String password;

    private String remoteDir = "~";

    private String type;

	public UserPasswordRemoteSessionInfo copy(){
		UserPasswordRemoteSessionInfo news = null;
		try {
			news = (UserPasswordRemoteSessionInfo) this.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return news;
	}
    
    public void setSessionName(String sessionName) {
        this.sessionName = sessionName;
    }

    public String getSessionName() {
        return sessionName;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getHost() {
        return host;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setRemoteDir(String remoteDir) {
        this.remoteDir = remoteDir;
    }

    public String getRemoteDir() {
        return remoteDir;
    }
    
	public String toXml(){
		return 
		"	<session>\n" + 
		"		<name>"+sessionName+"</name>\n" + 
		"		<host>"+host+"</host>\n" + 
		"		<user>"+userName+"</user>\n" + 
		"		<password>"+password+"</password>\n" + 
		"		<remoteDir>"+remoteDir+"</remoteDir>\n" + 
		"		<type>"+type+"</type>\n" + 
		"	</session>\n";
	}
}
